package com.tanhua.dubbo.api;

import com.tanhua.model.enums.CommentType;
import com.tanhua.model.mongo.Comment;

import java.util.List;

public interface CommentApi {

    //分页查询
    List<Comment> findComments(String movementId, CommentType comment, Integer page, Integer pagesize);

    //添加一条评论,点赞,喜欢
    Integer save(Comment comment1);

    //查询userId是否点赞,喜欢 --动态
    Boolean hasComment(String movementId, Long userId, CommentType type);

    //删除点赞,喜欢 --动态
    Integer delete(Comment comment);

    //查询userId是否点赞 --评论
    Boolean hasLikeComment(String commentId, Long userId, CommentType like);

    //保存对评论的点赞数据
    Integer saveComment(Comment comment);

    //删除点赞,评论
    Integer deleteComment(Comment comment);
}